<div id="pd_pager" class="jqpager" style="margin-bottom:10px;margin-top:5px;overflow:hidden;display:inline;float:right"></div>		
<table class="table table-striped table-bordered" id="mainProductTable" style="padding-top: 5px;" border="0">
	<thead>
		<tr>
			<th><span style="vertical-align: middle;">&nbsp;&nbsp;商品</span></th>
			<th>商品价格</th>
			<th>库存</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody class="pdLotGrid"></tbody>
</table>
<!-- html 模板文件 -->
<script type="text/template" id="pd_table_tr_tpl_url">
{{each list as item i}}
	<tr id="tr_id_{{item.id}}" class="package" data-id="{{item.id}}" data-title="{{item.name}}" data-img="{{item.img}}"">
	<td><img width="40" height="40" src="{{item.img}}"><a class="new-window" href="javascript:void(0)" title="{{item.name}}">&nbsp;{{item.name}}</a></img></td>
	<td><span class="label label-success">￥{{item.price}}</span></td>            
    <td><span>{{item.stock}}</span></td>
	<td><a onclick="chooseItem(this)"  class="btn btn-success">选择</a></td>
</tr>
{{/each}}
</script>
<script type="text/template" id="table_noresult_tr_tpl_url">
	<tr class="package"><td class="center" colspan="4"><font color="blue">请先进入"应用中心/微商城"插件中的"商品管理"中发布商品</font></td></tr>
</script>
<script type="text/javascript">
	var params = {};
	var table = new obz.TableView("pd_pager", "#(webctx)/product/list", params, function(resp){
		if(resp && resp.list && resp.list.length>0){
			log(JSON.stringify(resp))
			$('.pdLotGrid').html(template('pd_table_tr_tpl_url', resp));
			TBatch.tableId = "mainProductTable";
			//初始化checkbox点击事件
			TBatch.checkCheckbox();
			TBatch.initCheckboxClick();
		}
	}); 
	table.init();
</script>